import { Rule } from '@midwayjs/validate';
import { BaseDTO } from '../../../common/base.dto';
import { BaseSysRole } from '../entity/role';
import { R } from '../../../common/base.error.util';
import { array, number, requiredString } from '../../../common/common.validate.rules';

export class RoleDTO extends BaseDTO<BaseSysRole> {
  @Rule(requiredString.error(R.validateError('名称不能为空')))
  name: string;
  @Rule(array.items(number))
  menuList: string[];
}
